<script setup>
import { onMounted } from "vue";

// Define props for the component
defineProps({
  text: {
    type: String,
    default: "蜀ICP备2024103119号",
  },
});

onMounted(() => {
  const instances = document.querySelectorAll("#layout-footer-bei-an");

  // Remove all instances except the last one
  instances.forEach((instance, index) => {
    if (index !== 0) {
      instance.remove();
    }
  });
});
</script>

<template>
  <q-footer class="main-layout-footer">
    <a
      id="layout-footer-bei-an"
      href="https://beian.miit.gov.cn/"
      target="_blank"
      class="flex-center"
    >
      {{ text }}
    </a>
  </q-footer>
</template>

<style>
.main-layout-footer {
  justify-self: center;
  background: center;
  text-align-last: center;
}

.main-layout-footer > a {
  color: #999999;
  text-decoration: none;
  font-size: 0.8em;
}
</style>
